package com.fourth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author 小袁
 */
@Data
@ApiModel(value = "QueryDatabaseDto", description = "数据源分页查询参数")
public class QueryDatabaseDto {

    @ApiModelProperty(value = "排序状态",required = true)
    @Max(value = 1,message = "排序状态参数格式错误")
    @Min(value = 0,message = "排序状态参数格式错误")
    @NotNull(message = "排序状态不能为空")
    private Integer sort;

    @ApiModelProperty(value = "当前页", required = true)
    @NotNull(message = "当前页码不能为空")
    private Integer current;

    @ApiModelProperty(value = "分页大小", required = true)
    @NotNull(message = "分页大小不能为空")
    private Integer pageSize;

    @ApiModelProperty(value = "应用状态")
    @Max(value = 2,message = "应用状态参数格式错误")
    @Min(value = 0,message = "应用状态参数格式错误")
    private Integer applyStatus;

    @ApiModelProperty(value = "数据源名称")
    private String name;
}
